package cn.zl.mapper;

import cn.yunbamboos.mybatis.annotation.CustomQuery;
import cn.yunbamboos.mybatis.annotation.GenerateXML;
import cn.yunbamboos.mybatis.mapper.GenericMapper;
import cn.zl.model.VirtualVideoStream;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@GenerateXML
@Repository
public interface VirtualVideoStreamMapper extends GenericMapper<VirtualVideoStream> {

    @CustomQuery(sql = "select count(1) from zl_virtual_video_stream", resultType = Integer.class)
    int total();

    @CustomQuery(sql = "select count(1) from zl_virtual_video_stream where state=#{state}", resultType = Integer.class)
    int countState(@Param("state") int state);
}
